package com.ky.gp.app.controller;



import com.ky.common.vo.R;
import com.ky.gp.app.service.SmsLogFeign;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/sms")
public class SmsLogController {

    @Autowired
    private SmsLogFeign smsLogFeign;


    @RequestMapping(value = "/sendrcode",method = RequestMethod.GET) // 发送验证码
    public R sendRegisterCode(String phone){
        return smsLogFeign.sendRegisterCode(phone);
    }
    /**
     * 发送登录验证码
     * @param phone
     * @return
     */
    @ApiOperation(value = "发送登录验证码")
    @RequestMapping("/sendlcode")
    public R sendLoginCode(@RequestParam("phone") String phone){
        return smsLogFeign.sendLoginCode(phone);
    }

}
